<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page trimDirectiveWhitespaces="true" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
        <meta name="format-detection" content="telephone=no">
        <title>支付信息确认</title>
        <link rel="stylesheet" href="<c:url value="/resource/pay/css/frozen.css"/>">
        <style type="text/css">
            .item-label {
                display: inline-block;
                text-align: right;
                color: rgba(0, 0, 0, 0.58);
            }

            .amount {
                color: #ff0000;
                font-weight: bold;
            }

            .item-con {
                position: relative;
                text-indent: 5px;
            }

            .ui-form-item input, .ui-form-item textarea {
                padding-left: 0;
                width: auto;
            }
        </style>
    </head>
</head>
<body ontouchstart="">
<header class="ui-header ui-header-positive ui-border-b">
    <h1>支付信息确认</h1>
</header>
<section class="ui-container">
    <form action="http://139.210.164.140:8888/ZFPT/interfaces/tran/mobile/mobileWapPay" method="post"
          onsubmit="return checkParams();">
        <div class="ui-form-item ui-form-item-order ui-border-b">
            <span class="item-label">订单编号:</span>
            <input class="item-con" id="bizNo" name="bizNo" value="${bizNo}" readonly style="min-width:210px;"/>
        </div>
        <div class="ui-form-item ui-form-item-order ui-border-b">
            <span class="item-label">事项名称:</span>
            <input class="item-con" id="settleDesc" name="settleDesc" value="${settleDesc}" readonly/>
        </div>
        <div class="ui-form-item ui-form-item-order ui-border-b">
            <span class="item-label">支付金额:</span>
            <input class="amount" id="amt" name="amt" value="${amt}" width="auto" style="width:50px;text-indent: 5px;" readonly/>元
        </div>
        <div class="ui-form-item ui-form-item-order ui-border-b">
            <span class="item-label">支付有效期:</span>
            <input class="item-con" id="payerName" value="${expire}" readonly/>
        </div>
        <div class="ui-form-item ui-form-item-order ui-border-b">
            <span class="item-label">受理机构:</span>
            <input class="item-con" id="payerNo" value="${unitName}" readonly/>
        </div>

        <input type="hidden" name="version" value="${version}"/>
        <input type="hidden" name="charset" value="${charset}"/>
        <input type="hidden" name="transType" value="${transType}"/>
        <input type="hidden" name="catCode" value="${catCode}"/>
        <input type="hidden" name="catName" value="${catName}"/>
        <input type="hidden" name="appName" value="${appName}"/>
        <input type="hidden" name="appNo" value="${appNo}"/>
        <input type="hidden" name="frontUrl" value="${frontUrl}"/>
        <input type="hidden" name="backEndUrl" value="${backEndUrl}"/>
        <input type="hidden" name="bizDate" value="${bizDate}"/>
        <input type="hidden" name="bankNo" value="${bankNo}"/>
        <input type="hidden" name="ccy" value="${ccy}"/>
        <input type="hidden" name="payType" value="${payType}"/>
        <input type="hidden" name="signMethod" value="${signMethod}"/>
        <input type="hidden" name="signature" value="${signature}"/>
        <div class="ui-btn-wrap">
            <button id="btn_submit" type="submit" class="ui-btn-lg ui-btn-primary disabled">确认并支付</button>
        </div>
    </form>
</section>
<script type="text/javascript" src="<c:url value="/resource/pay/js/lib/zeptojs/zepto.min.js"/>"></script>
<script type="text/javascript" src="<c:url value="/resource/pay/js/frozen.js"/>"></script>
<script type="text/javascript">



    function checkParams() {
        <c:if test="${not empty error}">
        $('<div><\%=content\%><</div>').tips({stayTime: 0, content: '${error}'});
        return false;
        </c:if>
        var bizNo = document.getElementById("bizNo").value;
        if (!bizNo) {
            $('<div><\%=content\%><</div>').tips({stayTime: 0, content: '商户订单号信息缺失'});
            return false;
        } else if (isNaN(bizNo)) {
            $('<div><\%=content\%><</div>').tips({stayTime: 0, content: '商户订单号信息错误'});
            return false;
        }
        var settleDesc = document.getElementById("settleDesc").value;
        if (!bizNo || 0 == settleDesc.trim().length) {
            $('<div><\%=content\%><</div>').tips({stayTime: 0, content: '事项名称信息缺失'});
            return false;
        }
        var amt = document.getElementById("amt").value;
        if (!amt) {
            $('<div><\%=content\%><</div>').tips({stayTime: 0, content: '支付金额信息缺失'});
            return false;
        } else if (isNaN(amt)) {
            $('<div><\%=content\%><</div>').tips({stayTime: 0, content: '支付金额信息错误'});
            return false;
        }
        $('#btn_submit').removeClass('disabled');
        return true;
    }
    if (checkParams()) {
        $('#btn_submit').removeClass('disabled');
    }
</script>
</body>
</html>
</html>